﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TreeSharp;

namespace FelMaster.Classes.Paladin
{
    class Retribution : TalentBase
    {
        public override string Name
        {
            get { return "Ret Paladin By d4rk99"; }
        }

        public override string KeySpell
        {
            get { return "Templar's Verdict"; }
        }

        public override Composite SingleRotation
        {
            get
            {
                return new PrioritySelector(
                    SC.CastSpell("Judgement", a => SC.PlayerBuffTimeLeft("Judgements of the Pure") <= 10, "Missing JOTP Buff"),
                    SC.CastBuff("Zealotry", a => true, "Zealotry"),
                    SC.CastSpell("Guardian of Ancient Kings", a => SC.PlayerHasBuff("Zealotry"), "GOAK with Zeal"),
                    SC.CastBuff("Avenging Wrath", a => SC.PlayerHasBuff("Zealotry"), "Wing with Zeal"),
                    SC.CastSpell("Inquisition", a => SC.PlayerBuffTimeLeft("Inquisition") <= 5 && Me.CurrentHolyPower >= 3 || SC.PlayerHasBuff("Divine Purpose"), "Inquisition"),
                    //SC.RunMacroText("/use Golemblood Potion", a => SC.PlayerHasBuff("Bloodlust") || SC.PlayerHasBuff("Heroism"), "Golemblood Potion"),
                    SC.CastSpell("Crusader Strike", a => Me.CurrentHolyPower < 3, "Crusader Strike"),
                    SC.CastSpell("Templar's Verdict", a => Me.CurrentHolyPower >= 3 || SC.PlayerHasBuff("Divine Purpose"), "Templar's Verdict"),
                    SC.CastSpell("Hammer of Wrath", a => Me.CurrentTarget.HealthPercent <= 20 || SC.PlayerHasBuff("Zealotry"), "Hammer of Wrath"),
                    SC.CastSpell("Exorcism", a => SC.PlayerHasBuff("The Art of War"), "TAOW Exorcism"),
                    SC.CastSpell("Judgement", a => true, "Judgement"),
                    SC.CastSpell("Holy Wrath", a => true, "Holy Wrath"),
                    SC.CastSpell("Consecration", a => Me.CurrentMana > 17000, "Consecration"),
                    SC.CastBuff("Divine Plea", a => true, "Divine Plea")
                );
            }
        }

        public override Composite Buffs
        {
            get
            {
                return new PrioritySelector(
                    SC.CastBuff("Seal of Truth", a => true, "Seal of Truth"),
                    //cowdude: adding a 'simple'n smart' blessing
                    SC.CastBuff("Blessing of Kings", a => !SC.PlayerHasBuff("Mark of the Wild"), "Blessing of Kings as I don't have druid buff"),
                    SC.CastBuff("Blessing of Might", a => SC.PlayerHasBuff("Mark of the Wild"), "Blessing of Might as I have druid buff")
                );
            }
        }

        public override Composite PVPRotation
        {
            get { throw new NotImplementedException(); } //leave it as it is, unless you want to code a PVP specific rotation
        }

        public override Composite PVERotation
        {
            get { throw new NotImplementedException(); } //leave it as it is, unless you want to code a Raid/Party specific rotation
        }
    }
}